package com.mydesign.demo.controller;

import com.mydesign.demo.bean.StoreCommentWithBLOBs;
import com.mydesign.demo.model.ReturnResult;
import com.mydesign.demo.service.StoreToAssignmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("StoreToAssignment")
public class StoreToAssignmentController {
    @Autowired
    private StoreToAssignmentService storeToAssignmentService;

    @GetMapping("selectMyReceiving")
    public ReturnResult selectMyReceiving(HttpServletRequest request){
        return storeToAssignmentService.selectMyReceiving(request);
    }

    @GetMapping("selectMyOrder")
    public ReturnResult selectMyOrder(HttpServletRequest request){
        return storeToAssignmentService.selectMyOrder(request);
    }
    @GetMapping("selectCancelOrder")
    public ReturnResult selectCancelOrder(HttpServletRequest request){
        return storeToAssignmentService.selectCancelOrder(request);
    }
    @GetMapping("selectOrderDetails")
    public ReturnResult selectOrderDetails(HttpServletRequest request){
        return storeToAssignmentService.selectOrderDetails(request);
    }
    @GetMapping("accessOrderBtn")
    public ReturnResult accessOrderBtn(HttpServletRequest request){
        return storeToAssignmentService.accessOrderBtn(request);
    }
    @GetMapping("accessArriveBtn")
    public ReturnResult accessArriveBtn(HttpServletRequest request){
        return storeToAssignmentService.accessArriveBtn(request);
    }
    @GetMapping("accessArriveBtnUser")
    public ReturnResult accessArriveBtnUser(HttpServletRequest request){
        return storeToAssignmentService.accessArriveBtnUser(request);
    }
    @GetMapping("accessSuccessBtnUser")
    public ReturnResult accessSuccessBtnUser(HttpServletRequest request){
        return storeToAssignmentService.accessSuccessBtnUser(request);
    }
    @GetMapping("cancelOrderBtn")
    public ReturnResult cancelOrderBtn(HttpServletRequest request){
        return storeToAssignmentService.cancelOrderBtn(request);
    }
    @GetMapping("cancelButWantOrderBtn")
    public ReturnResult cancelButWantOrderBtn(HttpServletRequest request){
        return storeToAssignmentService.cancelButWantOrderBtn(request);
    }
    @PostMapping("CommentMyOrderToStore")
    //派小店派单评价
    public ReturnResult CommentMyOrderToStore(@RequestBody StoreCommentWithBLOBs storeComment){
        return storeToAssignmentService.CommentMyOrderToStore(storeComment);
    }
    //查询评价
    @GetMapping("selectComment")
    public ReturnResult selectComment(HttpServletRequest request){
        return storeToAssignmentService.selectComment(request);
    }
}
